﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;
namespace ConfExpert.Forms.Depo
{
    public partial class UpdFabricType : XForm
    {
        public UpdFabricType()
        {
            InitializeComponent();
        }

        private void UpdFabricType_Load(object sender, EventArgs e)
        {
            gridView1.Init("UpdFabricType", WhoAmI);

            gridView1.FormatAsNumber(1, "Qty");
            gridView1.AddSummary("Qty");
            gridView1.MakeReadOnly("KaliteId", "KaliteAciklama", "KompozisyonId", "Konstruksiyon", "FabricTypeId", "EnGrubu", "FinishId", "DesenId", "Agirlik");
            btnKaydet.ItemClick += btnKaydet_ItemClick;
            gridView1.BestFitColumns();
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEditing();
            gridView1.Update("ProductId,KaliteId,KaliteAciklama,KompozisyonId,Konstruksiyon,FabricTypeId,EnGrubu,FinishId,DesenId,Agirlik", "Product");
            Notify("Saved");
        }
    }
}
